<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/template/default/commonLayout.xhtml">

	<ui:define name="content">

		<h:form id="loginForm" prependId="false">
			<h:panelGrid id="grid" columns="3" cellpadding="4">

				<h:outputText value="#{msg['username']}" />
				<p:inputText id="username" required="true"
					value="#{loginBean.username}">
					<f:validator validatorId="notEmptyValidator"
						binding="#{notEmptyValidator}" />
				</p:inputText>
				<p:message for="username" display="text" />

				<h:outputText value="#{msg['password']}" />
				<p:password id="password" required="true"
					value="#{loginBean.password}">
					<f:validator validatorId="notEmptyValidator"
						binding="#{notEmptyValidator}" />
				</p:password>
				<p:message for="password" display="text" />

				<input type="hidden" name="#{_csrf.parameterName}"
					value="#{_csrf.token}" />

				<h:commandButton action="#{loginBean.doLogin()}"
					value="#{msg['login']}" />

			</h:panelGrid>

		</h:form>
	</ui:define>

</ui:composition>

</html>